import { createSlice  } from '@reduxjs/toolkit';

const testSlice = createSlice({
    name: "test",
    initialState:{
        count:0
    },
    reducers:{
        increment(state,action){
            state.count += action.payload;
        },
        decrement(state,action){
            state.count -= action.payload;
        }
    }
});
export const {increment,decrement} = testSlice.actions;
export default testSlice.reducer;